package com.moneywelcome.api;

import com.moneywelcome.dto.UserGradeInfo;
import com.moneywelcome.results.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;

@FeignClient(value = "risk",contextId = "UserGradeApi")
public interface UserGradeApi {
    @PutMapping("grade/{userId}/{score}")
    Result saveGrade(@PathVariable("userId") Integer userId, @PathVariable("score") Integer score);

    @GetMapping("grade/{userId}")
    Result<UserGradeInfo> getGradeByUser(@PathVariable("userId") Integer userId);
}
